package club.jdiy.core.convert;

import java.math.BigDecimal;
import java.math.BigInteger;

class ByteConverter extends NumberConverter<Byte> {
    public ByteConverter(Byte source) {
        super(source);
    }

    @Override
    public Boolean getBoolean() {
        return source != 0;
    }

    @Override
    public Byte getByte() {
        return getSource();
    }

    @Override
    public BigDecimal getBigDecimal() {
        return BigDecimal.valueOf(source);
    }

    @Override
    public BigInteger getBigInteger() {
        return BigInteger.valueOf(source);
    }
}
